package org.demo.honor.fake;

import org.demo.honor.pojo.constants.OrderStatusEnum;
import org.demo.honor.pojo.entity.OrderEntity;
import org.demo.honor.repository.OrderRepository;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.math.BigDecimal;
import java.util.List;
import java.util.Optional;

public class OrderDatabaseFake implements OrderRepository {
    @Override
    public Optional<OrderEntity> findByPaymentId(String paymentId) {
        return Optional.empty();
    }

    @Override
    public List<OrderEntity> findAll() {
        return null;
    }

    @Override
    public List<OrderEntity> findAll(Sort sort) {
        return null;
    }

    @Override
    public Page<OrderEntity> findAll(Pageable pageable) {
        return null;
    }

    @Override
    public List<OrderEntity> findAllById(Iterable<Integer> iterable) {
        return null;
    }

    @Override
    public long count() {
        return 0;
    }

    @Override
    public void deleteById(Integer integer) {

    }

    @Override
    public void delete(OrderEntity orderEntity) {

    }

    @Override
    public void deleteAll(Iterable<? extends OrderEntity> iterable) {

    }

    @Override
    public void deleteAll() {

    }

    @Override
    public <S extends OrderEntity> S save(S s) {
        OrderEntity order = OrderEntity.builder()
                .id(11).customerId("customerId")
                .count(100).singleAmount(BigDecimal.valueOf(1111))
                .orderStatus(OrderStatusEnum.DEPOSITED).build();
        return (S) order;
    }

    @Override
    public <S extends OrderEntity> List<S> saveAll(Iterable<S> iterable) {
        return null;
    }

    @Override
    public Optional<OrderEntity> findById(Integer integer) {
        return Optional.empty();
    }

    @Override
    public boolean existsById(Integer integer) {
        return false;
    }

    @Override
    public void flush() {

    }

    @Override
    public <S extends OrderEntity> S saveAndFlush(S s) {
        return null;
    }

    @Override
    public void deleteInBatch(Iterable<OrderEntity> iterable) {

    }

    @Override
    public void deleteAllInBatch() {

    }

    @Override
    public OrderEntity getOne(Integer integer) {
        return null;
    }

    @Override
    public <S extends OrderEntity> Optional<S> findOne(Example<S> example) {
        return Optional.empty();
    }

    @Override
    public <S extends OrderEntity> List<S> findAll(Example<S> example) {
        return null;
    }

    @Override
    public <S extends OrderEntity> List<S> findAll(Example<S> example, Sort sort) {
        return null;
    }

    @Override
    public <S extends OrderEntity> Page<S> findAll(Example<S> example, Pageable pageable) {
        return null;
    }

    @Override
    public <S extends OrderEntity> long count(Example<S> example) {
        return 0;
    }

    @Override
    public <S extends OrderEntity> boolean exists(Example<S> example) {
        return false;
    }
}
